<?php
declare (strict_types = 1);

namespace app\common\model;

class Team extends Base
{

    protected $name = 'user_team';
    /**
     * 文本内容
     */
    public function getTeamTextAttr($value, $data)
    {
        if($data['id']>2){
            $text = $data['zt_count'].'个'.parent::where('id',($data['id']-1))->value('title');
        }else{
            $text = '-';
        }
        return $text;
    }
    /**
     * 小区业绩
     */
    public function getMoneyTextAttr($value, $data)
    {
        if($data['id']>2){
            $text = '-';
        }else{
            $text = $data['team_money'];
        }
        return $text;
    }

}
